package models

import (
	"github.com/jinzhu/gorm"
	"kop/modules/role/entity"
)

func GetSignIn(dB *gorm.DB, roleID int32) entity.SignIn {

	var data = entity.SignIn{
		RoleID: roleID,
	}

	if err := dB.FirstOrCreate(&data).Error; err != nil {
		panic(err)
	}
	return data
}
